import request from '~/utils/request'

const API_NAME = '/web/edu/courses'

export default {
  // 按条件获取课程
  queryBy(searchObj) {
    return request({
      url: `${API_NAME}/`,
      method: 'get',
      params: searchObj
    })
  },
  // 根据ID获取一个课程信息
  queryInfoById(id) {
    return request({
      url: `${API_NAME}/${id}`,
      method: 'get'
    })
  },
}
